Add Docker Compose deployment and update TES services#27
Conversation
feat(ui): various minor improvements
Reviewer's GuideAdds a Docker Compose-based deployment path, updates TES instance configuration and credentials, and improves TES service-info discovery and frontend API configuration to support more ELIXIR TES backends behind nginx/proxied setups. Sequence diagram for TES service-info discovery with credentials and fallback endpointssequenceDiagram
participant Frontend as Frontend
participant Backend as Backend_API
participant TES as TES_Instance
participant Auth as get_instance_credentials
Frontend->>Backend: GET /api/service_info?tes_url
Backend->>Backend: get_service_info(tes_url)
Backend->>Auth: get_instance_credentials("unknown", tes_url)
Auth-->>Backend: { user, password, token }
Backend->>TES: requests.get(tes_url + "/ga4gh/tes/v1/service-info", headers, auth)
alt service-info exposed
TES-->>Backend: 200 JSON payload
Backend-->>Frontend: service info JSON
else service-info not exposed
Backend->>TES: requests.get(tes_url + "/v1/tasks", headers, auth)
alt /v1/tasks reachable
TES-->>Backend: 200 JSON payload
Backend-->>Frontend: synthetic service info (from tasks payload)
else auth required or other error
TES-->>Backend: 401/403/other
Backend-->>Frontend: error "Authentication required or credentials rejected"
end
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Docker Compose setup hardcodes an IP for
spe4hd.tes.bihealth.orgviaextra_hosts; consider moving this to environment or DNS configuration so deployments don’t rely on a specific static IP baked into version control. - In
tes_service.get_service_infoand related auth code, URL-based instance matching and credentials are spread across string checks; you might centralize these mappings in a configuration structure to make adding/updating TES instances less error-prone. - The new
get_service_infologic uses multipleprintstatements and builds synthetic service-info for/v1/tasksresponses; consider switching to the existing logging mechanism and clearly distinguishing synthetic vs real metadata in the returned payload to simplify downstream handling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Docker Compose setup hardcodes an IP for `spe4hd.tes.bihealth.org` via `extra_hosts`; consider moving this to environment or DNS configuration so deployments don’t rely on a specific static IP baked into version control.
- In `tes_service.get_service_info` and related auth code, URL-based instance matching and credentials are spread across string checks; you might centralize these mappings in a configuration structure to make adding/updating TES instances less error-prone.
- The new `get_service_info` logic uses multiple `print` statements and builds synthetic service-info for `/v1/tasks` responses; consider switching to the existing logging mechanism and clearly distinguishing synthetic vs real metadata in the returned payload to simplify downstream handling.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
Adds a Docker Compose-based deployment path for the TES Dashboard (frontend + backend) and refreshes TES instance configuration/discovery so the app can better handle multiple TES endpoint layouts and authentication scenarios across updated ELIXIR/BIH services.
Changes:
- Introduce a
docker-compose.ymlworkflow to run frontend + backend together (including a backend healthcheck gate for the frontend). - Update TES instance lists/identifiers across frontend constants and backend instance location data.
- Improve backend TES service-info discovery by normalizing URLs, trying multiple endpoint patterns, and supporting token/basic-auth when probing endpoints.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates setup instructions to emphasize Docker Compose deployment and refreshes API docs/troubleshooting. |
| docker-compose.yml | Adds Compose services for backend and frontend, with healthcheck-based dependency ordering. |
| frontend/src/utils/constants.js | Refreshes the built-in supported TES instance list (names/URLs/IDs). |
| frontend/src/services/api.js | Adjusts API base URL selection to allow empty-string override for proxy-based deployments. |
| frontend/Dockerfile | Adds a build arg/env to optionally override REACT_APP_API_URL at image build time. |
| backend/utils/auth_utils.py | Updates instance credential resolution logic for current ELIXIR/BIH endpoints and normalizes instance URLs. |
| backend/tes_instance_locations.json | Replaces/expands TES instance location metadata and identifiers. |
| backend/services/tes_service.py | Expands service-info discovery: URL normalization, multiple endpoint attempts, and auth-aware probing. |
| backend/.tes_instances | Updates the default persisted TES instance list used by the backend loader. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Valentin Schneider-Lunitz <45590799+vschnei@users.noreply.github.com>
| environment: | ||
| PORT: 8000 | ||
| FLASK_ENV: production | ||
| FLASK_DEBUG: "false" |
Summary
Summary by Sourcery
Introduce Docker Compose-based deployment for the TES dashboard and improve TES instance discovery and authentication handling.
New Features:
Enhancements: